<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			let name = 'yan',
			age = '123';
			function F(name,age){
				this.name = name;
				this.age = age;
			}
			let fun = new F('wang','12');
			console.log(fun);
			let F2 = {
				name,
				age,
				print(){
					console.log(name,age);
				}
			};
			console.log(F2);
			F2.print();
		</script>
	</body>
</html>
